/* @(#)DecoratorWorkTeam.java
** 
** Copyright (C) 2012 by Steven D. Stamps
**
**             Trademarks & Copyrights
** Flywheel Management Science(TM), Flywheel Management Model(TM),
** Flywheel Story Editor(TM) and FlywheelMS(TM) are exclusive trademarks
** of Steven D. Stamps and may only be used freely for the purpose of
** identifying the unforked version of this software.  Subsequent forks
** may not use these trademarks.  All other rights are reserved.
** and FlywheelMS(TM) are exclusive trademarks of Steven D. Stamps
** and may only be used freely for the purpose of identifying the
** unforked version of this software.  Subsequent forks (if any) may
** not use these trademarks.  All other rights are reserved.
**
** DecKanGL (Decorated Kanban Glyph Language) and TribKn (Tribal Knowledge)
** are also exclusive trademarks of Steven D. Stamps.  These may be used
** freely within the unforked FlywheelMS application and documentation.
** All other rights are reserved.
**
** gConGUI (game Controller Graphical User Interface) is an exclusive
** trademark of Steven D. Stamps.  This trademark may be used freely
** within the unforked FlywheelMS application and documentation.
** All other rights are reserved.
**
** Trademark information is available at
** <http://www.flywheelms.com/trademarks>
**
** Flywheel Management Science(TM) is a copyrighted body of management
** metaphors, governance processes, and leadership techniques that is
** owned by Steven D. Stamps.  These copyrighted materials may be freely
** used, without alteration, by the community (users and developers)
** surrounding this GPL3-licensed software.  Additional copyright
** information is available at <http://www.flywheelms.org/copyrights>
**
**              GPL3 Software License
** This program is free software: you can use it, redistribute it and/or
** modify it under the terms of the GNU General Public License, version 3,
** as published by the Free Software Foundation. This program is distributed
** in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
** even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
** PURPOSE.  See the GNU General Public License for more details. You should
** have received a copy of the GNU General Public License, in a file named
** COPYING, along with this program.  If you cannot find your copy, see
** <http://www.gnu.org/licenses/gpl-3.0.html>.
*/

package com.flywheelms.library.fmm.deckangl;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import android.graphics.drawable.Drawable;

import com.flywheelms.library.FmsLibraryApplication;
import com.flywheelms.library.R;
import com.flywheelms.library.deckangl.enumerator.DecoratorColor;
import com.flywheelms.library.deckangl.glyph.DecoratorEnumeration;
import com.flywheelms.library.deckangl.glyph.TribKnQualityMetric;

public class DecoratorWorkTeam extends DecoratorEnumeration {

	protected static DecoratorWorkTeam staticInstance = new DecoratorWorkTeam();
	
	protected static TribKnQualityMetric tribKnQualityMetric;
	static {
		tribKnQualityMetric = FmmDecKanGlDictionary.getInstance().getTribKn(
				FmmDecKanGlDictionary.tribKn_WORK_TEAM );
	}
	
	public static DecoratorWorkTeam NO_WORK_TEAM = new DecoratorWorkTeam(
			"No Work Team",
			R.string.decorator__work_team__none,
			R.integer.decorator__work_team__none__quality_index,
			DecoratorColor.RED );
	public static DecoratorWorkTeam WORK_TEAM_SWAG = new DecoratorWorkTeam(
			"Work Team SWAG",
			R.string.decorator__work_team__swag,
			R.integer.decorator__work_team__swag__quality_index,
			DecoratorColor.YELLOW );
	public static DecoratorWorkTeam PROPOSED_TEAM = new DecoratorWorkTeam(
			"Proposed Work Team",
			R.string.decorator__work_team__proposed,
			R.integer.decorator__work_team__proposed__quality_index,
			DecoratorColor.PINK );
	public static DecoratorWorkTeam CONFIRMED_TEAM = new DecoratorWorkTeam(
			"Confirmed Team",
			R.string.decorator__work_team__confirmed,
			R.integer.decorator__work_team__confirmed__quality_index,
			DecoratorColor.TRANSPARENT );
	public static DecoratorWorkTeam INACTIVE_CONFIRMED_WORK_TEAM_MEMBER = new DecoratorWorkTeam(
			"Inactive Confirmed Work Team Member(s)",
			R.string.decorator__work_team__inactive,
			R.integer.decorator__work_team__inactive__quality_index,
			DecoratorColor.ORANGE );
	public static DecoratorWorkTeam UNSPECIFIED_TEAM_QUALITY = new DecoratorWorkTeam(
			"Unspecified Team Quality",
			R.string.decorator__work_team__unspecified_quality,
			R.integer.decorator__work_team__unspecified_quality__quality_index,
			DecoratorColor.GRAY );
	public static DecoratorWorkTeam TEAM_QUALITY_NOT_ENABLED = new DecoratorWorkTeam(
			"Team Quality Not Enabled",
			R.string.decorator__work_team__not_enabled,
			R.integer.decorator__work_team__not_enabled__quality_index,
			DecoratorColor.DISABLED );
	
	protected static ArrayList<DecoratorEnumeration> valuesList =
			new ArrayList<DecoratorEnumeration>();
	static {
		valuesList.add(NO_WORK_TEAM);
		valuesList.add(WORK_TEAM_SWAG);
		valuesList.add(PROPOSED_TEAM);
		valuesList.add(CONFIRMED_TEAM);
		valuesList.add(INACTIVE_CONFIRMED_WORK_TEAM_MEMBER);
		valuesList.add(UNSPECIFIED_TEAM_QUALITY);
		valuesList.add(TEAM_QUALITY_NOT_ENABLED);
	}
	
	protected static HashMap<String, DecoratorWorkTeam> nameMap = new HashMap<String, DecoratorWorkTeam>();
	static {
		DecoratorWorkTeam.nameMap.put(NO_WORK_TEAM.getName(), NO_WORK_TEAM);
		DecoratorWorkTeam.nameMap.put(WORK_TEAM_SWAG.getName(), WORK_TEAM_SWAG);
		DecoratorWorkTeam.nameMap.put(PROPOSED_TEAM.getName(), PROPOSED_TEAM);
		DecoratorWorkTeam.nameMap.put(CONFIRMED_TEAM.getName(), CONFIRMED_TEAM);
		DecoratorWorkTeam.nameMap.put(INACTIVE_CONFIRMED_WORK_TEAM_MEMBER.getName(), INACTIVE_CONFIRMED_WORK_TEAM_MEMBER);
		DecoratorWorkTeam.nameMap.put(UNSPECIFIED_TEAM_QUALITY.getName(), UNSPECIFIED_TEAM_QUALITY);
		DecoratorWorkTeam.nameMap.put(TEAM_QUALITY_NOT_ENABLED.getName(), TEAM_QUALITY_NOT_ENABLED);
	}
	
	public static DecoratorWorkTeam getObjectForName(String aName) {
		return DecoratorWorkTeam.nameMap.get(aName);
	}

	private DecoratorWorkTeam() {
		super();
	}
	
	public static DecoratorWorkTeam getStaticInstance() {
		return staticInstance;
	}
	
	public DecoratorWorkTeam(
			String aName,
			int aDescriptionResourceId,
			int aTribKnQualityIndexResourceId,
			DecoratorColor aDecKanGlDecoratorColor ) {
		super (aName, aDescriptionResourceId, aTribKnQualityIndexResourceId, aDecKanGlDecoratorColor);
	}
	
	public static List<DecoratorEnumeration> values() {
		return valuesList;
	}

	@Override
	public TribKnQualityMetric getTribKnQualityMetric() {
		return tribKnQualityMetric;
	}

	@Override
	public String getLabelText() {
		return FmsLibraryApplication.getContext().getResources().getString(R.string.tribkn_quality_metric__work_team);
	}

	@Override
	public Drawable getLabelDrawable() {
		return FmsLibraryApplication.getContext().getResources().getDrawable(R.drawable.tribkn_quality_metric__work_team);
	}

}